﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:actions="clr-namespace:MEF_Test.Bricks.Actions"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <DataTemplate x:Key="BrowserNodeBaseTemplate">
        <DataTemplate.Resources>
            <actions:ActionTemplateSelector x:Key="ActionTemplateSelector"/>
        </DataTemplate.Resources>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Foreground="Blue" FontWeight="Bold" Text="{Binding Caption}" />
            <!--The data template to use for the supported actions is chosen with a DataTemplateSelector class, and is provided by the Action itself.-->
            <ItemsControl Grid.Column="1" ItemsSource="{Binding SupportedActions}" ItemTemplateSelector="{StaticResource ActionTemplateSelector}"/>
        </Grid>

    </DataTemplate>
</ResourceDictionary>